<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<f:subview id="dataContent">
    <f:loadBundle basename="offset.nodes.server.view.ApplicationResource" var="msg"/>


    <h:inputHidden value="#{ReferenceBean.referenceManager.pageStart}"/>
    <h:dataTable value="#{ReferenceBean.referenceManager.result}" var="Reference" styleClass="table" rowClasses="even,odd" columnClasses="icon,secondColumn,firstColumn" captionClass="dheading1" headerClass="header">
        <f:facet name="caption">
            <h:outputText value="#{msg.captionReferences}"/>
        </f:facet>

        <h:column>
            <f:facet name="header">
                <h:outputText value=""/>
            </f:facet>
            <h:graphicImage value="#{NodesBean.imagePath}/reference.png" alt="#{msg.reference}" title="#{msg.reference}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="#{msg.referencePath}" />
            </f:facet>
            <h:outputLink value="#{NodesBean.repositoryPath}#{Reference.path}">
                <h:outputText value="#{Reference.path}" styleClass="table"/>
            </h:outputLink>
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="#{msg.referenceName}" />
            </f:facet>
            <h:outputText value="#{Reference.name}" styleClass="table"/>
        </h:column>
    </h:dataTable>

    <h:panelGroup rendered="#{ReferenceBean.referenceManager.pager.pagingRequired}">
        <h:commandLink actionListener="#{ReferenceBean.referenceManager.pager.first}">
            <h:graphicImage value="/resources/first.png"/>
        </h:commandLink>
        <h:commandLink actionListener="#{ReferenceBean.referenceManager.pager.previous}">
            <h:graphicImage value="/resources/previous.png"/>
        </h:commandLink>
        <h:commandLink actionListener="#{ReferenceBean.referenceManager.pager.next}">
            <h:graphicImage value="/resources/next.png"/>
        </h:commandLink>
        <h:commandLink actionListener="#{ReferenceBean.referenceManager.pager.last}">
            <h:graphicImage value="/resources/last.png"/>
        </h:commandLink>
    </h:panelGroup>


</f:subview>